import React, { Component } from 'react';
import { useSearchParams,Link } from 'react-router-dom';


class WebContent extends Component {
    state = {
        SearchParams: this.props.params[0],
        setSeachParams: this.props.params[1],
    };
    render() {
        console.log(this.state.SearchParams.get('chapter'));
        return (
            <React.Fragment>
                <h1>Web-{this.props.params.chapter}</h1>
                <div>
                    内容
                </div>
                 <hr />
                <Link to='/web'> 返回 </Link>
            </React.Fragment>);
    }
}

export default (props) => (
    <WebContent
        {...props}
        params={useSearchParams()}
    />
)